let status = {
    addBox: true,
    boxRotate: true,
    boxResize: true,
    boxMove: true,
    drawExtent: true,
    canvasMove: false,
    editTable: false,
    shortcut: true,
    toString: function() {
        return 'addBox:' + this.addBox + ' boxRotate:' + this.boxRotate
         + ' boxResize:' + this.boxResize + ' boxMove:' + this.boxMove
          + ' drawExtent:' + this.drawExtent + ' canvasMove:' + this.canvasMove
           + ' editTable:' + this.editTable + ' shortcut:' + this.shortcut;
    },
    isAddBox: function() {
        return this.addBox;
    },
    isBoxRotate: function() {
        return this.boxRotate;
    },
    isBoxResize: function() {
        return this.boxResize;
    },
    isBoxMove: function() {
        return this.boxMove;
    },
    isDrawExtent: function() {
        return this.drawExtent;
    },
    isCanvasMove: function() {
        return this.canvasMove;
    },
    isEditTable: function() {
        return this.editTable;
    },
    isShortcut: function() {
        return this.shortcut;
    },
    setStatus: function(status) {
        this.addBox = status;// 添加组件
        this.boxRotate = status;// 旋转组件
        this.boxResize = status;// 改变组件大小
        this.boxMove = status;// 拖动组件
        this.drawExtent = status;// 框选
        this.shortcut = status;// 快捷方式
        this.canvasMove = false;// 移动画布
        this.editTable = false;// 数据面板
    },
    setAddBox: function(status) {
        this.setStatus(status);
        return this;
    },
    setBoxRotate: function(status) {
        this.setStatus(status);
        return this;
    },
    setBoxResize: function(status) {
        this.setStatus(status);
        return this;
    },
    setBoxMove: function(status) {
        this.setStatus(status);
        return this;
    },
    setDrawExtent: function(status) {
        this.setStatus(status);
        return this;
    },
    setShortcut: function(status) {
        this.setStatus(status);
        return this;
    },
    setCanvasMove: function(status) {
        this.setStatus(!status);
        this.canvasMove = status;
        this.shortcut = true;
        return this;
    },
    setEditTable: function(status) {
        this.setStatus(!status);
        this.editTable = status;
        return this;
    }
};

export default status;